<!DOCTYPE html>
<html lang='en'>
<head>
    <meta charset='UTF-8'>
    <meta name='viewport' content='width=device-width, initial-scale=1.0'>
    <title>Document</title>
    <script type='text/javascript' src='js/vue.js'></script>
</head>
<body>
    <div id='app'>
        {{msg | qq}}

        ==========
        <p>{{time |  dateFormat(1,2) }}</p>
    </div>
    <script type='text/javascript'>

        Vue.filter('qq',function(ww){
            return ww.replace('Vue','world')
        })
        
        // Vue.filter('dateFormat',function(msg,rr,tt){
        //     var  y=msg.getFullYear()
        //     var  m=msg.getMonth()+1
        //     return y+'-'+m+'========='+rr+'*********'+tt
        // })

        var vm = new Vue({
            el: '#app',
            data: {
                msg: 'Hello Vue',
                time:new  Date()
            },
            filters:{
                dateFormat(msg,rr,tt){
                    var  y=msg.getFullYear()
                    var  m=msg.getMonth()+1
                    return y+'-'+m+'========='+rr+'*********'+tt
                }

            }
        });
    </script>
</body>
</html>